<?php
session_start();

// 删除session
if(isset($_SESSION['views']))
{
unset($_SESSION['views']);
}
//您也可以通过调用 session_destroy() 函数彻底销毁 session：
session_destroy();
?>

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>my session test</title>
</head>
<body>
<!--检索 session 数据-->
<!--$_SESSION['views'] = 1;-->
<?php
    //存储 session 数据
    $is = isset($_SESSION['views']);
    echo "is is :".$is;
    if(is){

    }else{
         $_SESSION['views'] = $_SESSION['views']+1;
    }
    echo "浏览量：".$_SESSION['views']
?>

</body>
</html>